package com.centaline.androidsalesblog.model.databaseobject;

import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.DataSupport;

/**
 * 搜索
 * Created by guilin on 16/2/22.
 */
public class SearchDo extends DataSupport implements Parcelable {

    private int type;
    private String cityCode;
    private String title;
    private String code;
    private String category;

    public SearchDo() {
    }

    public SearchDo(int type, String cityCode) {
        this.type = type;
        this.cityCode = cityCode;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.type);
        dest.writeString(this.cityCode);
        dest.writeString(this.title);
        dest.writeString(this.code);
        dest.writeString(this.category);
    }

    protected SearchDo(Parcel in) {
        this.type = in.readInt();
        this.cityCode = in.readString();
        this.title = in.readString();
        this.code = in.readString();
        this.category = in.readString();
    }

    public static final Parcelable.Creator<SearchDo> CREATOR = new Parcelable.Creator<SearchDo>() {
        @Override
        public SearchDo createFromParcel(Parcel source) {
            return new SearchDo(source);
        }

        @Override
        public SearchDo[] newArray(int size) {
            return new SearchDo[size];
        }
    };
}
